package org.lgiavedoni.android.franq.util;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class JSONUtil {

	public static String getTextContent(Node e) {
		StringBuffer buffer = new StringBuffer();
		NodeList childList = e.getChildNodes();
		for (int i = 0; i < childList.getLength(); i++) {
			Node child = childList.item(i);
			if (child.getNodeType() != Node.TEXT_NODE)
				continue; // skip non-text nodes
			buffer.append(child.getNodeValue());
		}

		return buffer.toString();
	}

}
